const http = require("http");
const fs = require("fs");
// const {readFile} = require("fs");
// const {promisify} = require("util");
// const readFileP = promisify(readFile);

const server = http.createServer(async (req,res)=>{
   /* const data = await readFileP("./src/a.txt");
    const data2 = await readFileP(data.toString().trim());
    res.end(data2)*/


    fs.readFile("./src/a.txt",(err,data)=>{
        fs.readFile(data.toString().trim(),(err,data)=>{
            res.end(data)
        })
    })
});
server.listen(8000,"192.168.14.47",()=>{
    console.log("server is running on http://192.168.14.47:8000")
})